﻿using ConfExpert.Forms.Base;
using DevExpress.XtraPrinting;
using DevTeam;

using System;
using System.Data;

namespace ConfExpert.Forms.Siparisler
{
    public partial class _7cbarkodlist : XForm
    {
        DataTable dt;
        public _7cbarkodlist(DataTable dt)
        {
            InitializeComponent();
            this.dt = dt;
        }

        private void _7cbarkodlist_Load(object sender, EventArgs e)
        {
            gridView1.Init(dt);

            string FilePath = Dialogs.SaveFile("Excel Document", "Excel Documents|*.xlsx");
            XlsxExportOptions opt = new XlsxExportOptions();
            opt.TextExportMode = TextExportMode.Value;
            //gridView1.OptionsPrint.AutoWidth = false;
            //gridView1.BestFitColumns();
            gridView1.ExportToXlsx(FilePath, opt);
            this.Close();
        }
    }
}
